import request from '@/utils/request'

// 查询日程列表
export function listEvent(query) {
  return request({
    url: '/crm/event/list',
    method: 'get',
    params: query
  })
}

// 查询日程详细
export function getEvent(eventId) {
  return request({
    url: '/crm/event/' + eventId,
    method: 'get'
  })
}

// 新增日程
export function addEvent(data) {
  return request({
    url: '/crm/event',
    method: 'post',
    data: data
  })
}

// 修改日程
export function updateEvent(data) {
  return request({
    url: '/crm/event',
    method: 'put',
    data: data
  })
}

// 删除日程
export function delEvent(eventId) {
  return request({
    url: '/crm/event/' + eventId,
    method: 'delete'
  })
}

// 导出日程
export function exportEvent(query) {
  return request({
    url: '/crm/event/export',
    method: 'get',
    params: query
  })
}

export function getMyEventList(query) {
  return request({
    url: '/crm/event/getMyEventList',
    method: 'get',
    params: query
  })
}